package com.zxy.day0624_util.utils;

/**
 * @Auther: lenovo
 * @Date: 2021/9/27 20:48
 * @Description:
 */
public enum FileSizeUnit {
    B(1L, "B"),
    K(1024L, "KB"),
    M(1048576L, "MB"),
    G(1073741824L, "GB"),
    T(0L, "TB"),
    P(0L, "PB");

    private long code;
    private String name;

    public long getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    private FileSizeUnit(long code, String name) {
        this.code = code;
        this.name = name;
    }
}
